package com.santi.framework.filemanager.impl;

import java.io.BufferedReader;

import com.santi.framework.filemanager.service.FileIterator;

public class FileIteratorImpl implements FileIterator {
	private String _currentLine;
	private BufferedReader _reader;

	public FileIteratorImpl(BufferedReader reader) {
		_reader = reader;
	}

	public boolean hasNext() {
		try {
			_currentLine = _reader.readLine();
		} catch (Exception ex) {
			_currentLine = null;
			ex.printStackTrace();
		}

		return _currentLine != null;
	}

	public String next() {
		return _currentLine;
	}

	public void remove() {
	}
}
